-- GENERATED SPELL FOR [Druid of the Grove] --


function spell0_13443(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(22127,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13443', 11500, 1)
end

function spell1_13443(pUnit, Event) --@Starfire,n/a--
pUnit:FullCastSpellOnTarget(21668,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13443', 2000, 1)
end

function spell2_13443(pUnit, Event) --@Thorns,n/a--
pUnit:FullCastSpellOnTarget(22128,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13443', 599, 1)
end

function Sorts_13443(pUnit, Event)
local choix_sorts_13443 = math.random(0, 2)
if choix_sorts_13443 == 0 then
pUnit:RegisterEvent('spell0_13443', 1, 1)
end
if choix_sorts_13443 == 1 then
pUnit:RegisterEvent('spell1_13443', 1, 1)
end
if choix_sorts_13443 == 2 then
pUnit:RegisterEvent('spell2_13443', 1, 1)
end
end

function mob13443_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_13443', math.random(1500, 3000), 1)
end

function mob13443_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13443_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13443_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(13443, 1, 'mob13443_Action')
RegisterUnitEvent(13443, 2, 'mob13443_Leave')
RegisterUnitEvent(13443, 3, 'mob13443_Kill')
RegisterUnitEvent(13443, 4, 'mob13443_Die')
